
    
    var colState = "ASC";
    var currentPageIndex = -1;
    var colName = "";
    var divPagerHTML="";
    function OrderBy(col)
    {
        colName =  col;
        colState = (colState == "DESC" ? "ASC" : "DESC");
        col = "Sort" + "|" + col + "|" + colState + "|";
        WebForm_DoCallback('__Page',col,ReceiveData,"loginLog",ProcessCallBackError,false);
    }
    function GetPager(pageIndex,dviPagerID,divID)
    {
        if(currentPageIndex != pageIndex)
        {
            currentPageIndex = pageIndex;

            var divPager = document.getElementById(dviPagerID);    
            
            var value = (divPager == null ? "" : divPager.innerHTML);
            if(value != "")
            {
                divPagerHTML = value;
            }
            else if(currentPageIndex % 10 != 1)
            {   
                value = divPagerHTML;
            }
            pageIndex = "Page" + "|" + colName + "|" + colState + "|"  + pageIndex + "|" + value ;
            
            WebForm_DoCallback('__Page',pageIndex,ReceiveData,divID,ProcessCallBackError,false);
        }
    }
    function ReceiveData(result,context)
    {
        document.getElementById(context).innerHTML = result;
        
    }
    function ProcessCallBackError(arg,context)
    {
         alert(arg);
    }    
